#ifndef CONNECTOR_H
#define CONNECTOR_H
#include "../global.h"

#include <QObject>

class Wait;
class Company;
class Evaluation;

class Connector : public QObject {
    Q_OBJECT
  public:
    explicit Connector(QObject *parent=nullptr);
    ~Connector();
    State call(const QString &route,const QByteArray *input,
               QByteArray *output);
    State login(const QString *username,const QString *password,
                QString *state);
    State enroll(const QString *username,const QString *password,
                 QString *state);
    State query(const QStringList *entname,int pageSize,int pageRequest,
                int *pageCurr,int *pageTotal,
                QList<Company *> *companyList);
    State filter(const QVariantMap *constraint,int pageSize,int pageRequest,
                 int *pageCurr,int *pageTotal,
                 QList<Company *> *companyList);
    State predict(const Company *input,
                  Company *output);
    State train(Evaluation *evaluation);
  public:
    Wait *dialogWait;
};

#endif // CONNECTOR_H
